package com.jeeplus.netty;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;

public class NettyClient {

    public static void main(String[] args) {

        //1.创建客户端Socket，指定服务器地址和端口
        Socket socket = null;
        try {
            // socket = new Socket("39.101.204.110", 8088);
            socket = new Socket("127.0.0.1", NettyConst.PORT);
            //2.获取输出流，向服务器端发送信息
            OutputStream os = socket.getOutputStream();//字节输出流
            os.write("431248192绕口令付<CR><LF>款了符合eflkfjqwlkfkj<CR><LF>111111111".getBytes());
            os.flush();
            os.write("431248192绕口令付<CR><LF>款了符合eflkfjqwlkfkj<CR><LF>111111111".getBytes());
            os.flush();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
